package cn.jbt.api.admin.filter;


import cn.jbt.api.admin.entity.vo.LoginInfoVO;

public class LoginInfoAccessContext {

    private static final ThreadLocal<LoginInfoVO> loginInfoThreadLocal = new ThreadLocal<>();

    public static LoginInfoVO getLoginInfo() {
        return loginInfoThreadLocal.get();
    }

    public static void setLoginInfo(LoginInfoVO loginInfoVO) {
        loginInfoThreadLocal.set(loginInfoVO);
    }

    public static void clearLoginInfo() {
        loginInfoThreadLocal.remove();
    }

}
